﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InfoSupplier.aspx.cs" Inherits="NewTierra.Pages.InfoSupplier" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

  <link rel="shortcut icon" href="../../images/Icones/favicon.ico" type="image/x-icon" />
  <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>

  <link href="../../Styles/jquery-ui.css" rel="stylesheet" />    
    <script type="text/javascript" src="../../Scripts/jquery-1.11.0.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery-ui-1.10.0.js"></script>

  <script src="../../Scripts/jquery.MultiFile.js" type="text/javascript"></script>
  <script src="../../Scripts/jquery.lightbox-0.5.js" type="text/javascript"></script>
  <link href="../../Styles/jquery.lightbox-0.5.css" rel="stylesheet" type="text/css" />
  <link href="../../Styles/EstiloGeral.css" rel="stylesheet" type="text/css" />


    <title></title>
    <style type="text/css">
        body   
        {
         background-color:White;
         font-size: .80em;
         font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
         padding: 0px;
         width: 1329px;
         height: 1032px;
         margin-left: 5px;
         margin-right: 0px;
         margin-top: 5px;
         color: #666;
        }
        #informacoes
        {
            height: 968px;
            padding: 10px;
            width: 1330px;
        }
         #informacoes .ServInfoEsq
        {
            height: 918px;
            float: left;
            width: 647px;
        }
        #informacoes .ServInfoDir
        {
            height: 674px;
            float: left;
            width: 670px;
        }
        .fotoPr
        {
            height: 200px;
            width: 200px;
            float: left;
        }
        .imgCateg
        {
            height: 19px;
            float: left;
            width: 380px;
            margin-left: 5px;
        }
        .Endereco
        {
            height: 189px;
            float: left;
            width: 430px;
            margin-left: 5px;
        }
        .Infos
        {
            height: 680px;
            width: 637px;
            float: left;
            border:1px solid #DBDBDB;
            border-radius:6px;
            -moz-border-radius:6px;
	        webkit-border-radius:6px;
	        background-color:#FFF;
        }
         #scrollInfo
        {
            height: 662px;
            overflow: auto;
            width: 621px;
            margin-left: 10px;
            margin-top: 10px;
        }
         #scrollFotos 
         {
            width:659px;
            height:191px;
            overflow:auto;
            margin-top: 9px;
        }
        #MapaGoogle
        {
            width: 643px;
            height: 392px;
            padding: 10px;
            margin-top: 20px;
            border:1px solid #DBDBDB;
            border-radius:6px;
            -moz-border-radius:6px;
	        webkit-border-radius:6px;
	        background-color:#FFF;
        }
        .titulo
        {
            width: 533px; 
            margin-bottom: 0px; 
            margin-top: 0px; 
            font-family: verdana, Geneva, Tahoma, sans-serif; 
            font-weight: normal;
        }
        .tituloEndereco
        {
            font-family: Helvetica, Arial, sans-serif;
            font-size: 15px;
            font-weight: bold;
            font-style: italic;
            color: #0766D0;
            padding: 0 0 0 5px;
            line-height: 29px;
        }
    </style>
</head>
<body>

 <script type="text/javascript">

     $(document).ready(function () {
         $('#gallery a').lightBox();
     });

     var map;
     var geocoder;

     function InitializeMap() {
         geocoder = new google.maps.Geocoder();

         var address = document.getElementById('<%= lblEndereco.ClientID %>').innerHTML;
         var htl = document.getElementById('<%= lblNomeSupplier.ClientID %>').innerHTML;
         var endereco = document.getElementById('<%= lblEndereco.ClientID %>').innerHTML;
         var foto = ('<%= fotoMapaGoogle %>');
         var descricao = "<table border='0' cellpadding='0' cellspacing='0'><tr><td valign='top'><img src='" + foto + "'  width='70px' height='70px' /></td><td valign='top' style='padding-left: 5px; padding-right:10px; text-align:left; font-family:Tahoma; font-size:9pt'><b>" + htl + "</b><br/>" + endereco + "</td></tr></table>"

         var myOptions =
        {
            zoom: 15,
            mapTypeId: google.maps.MapTypeId.ROADMAP,
            //disableDefaultUI: true
            mapTypeControl: true,
            mapTypeControlOptions:
            {
                style: google.maps.MapTypeControlStyle.DROPDOWN_MENU,
                poistion: google.maps.ControlPosition.TOP_RIGHT,
                mapTypeIds: [google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.TERRAIN,
		        google.maps.MapTypeId.HYBRID, google.maps.MapTypeId.SATELLITE]
            },
            navigationControl: true,
            navigationControlOptions:
            {
                style: google.maps.NavigationControlStyle.ZOOM_PAN
            },
            scaleControl: true,
            disableDoubleClickZoom: true,
            streetViewControl: true,
            draggableCursor: 'move'
        };
         map = new google.maps.Map(document.getElementById("map"), myOptions);
         geocoder.geocode({ 'address': address }, function (results, status) {
             if (status == google.maps.GeocoderStatus.OK) {
                 map.setCenter(results[0].geometry.location);
                 var marker = new google.maps.Marker

                    (
            {
                position: results[0].geometry.location,
                map: map,
                title: 'Clique aqui!'
            }
        );
                 var infowindow = new google.maps.InfoWindow({
                     content: descricao
                 });
                 google.maps.event.addListener(marker, 'click', function () {
                     // Calling the open method of the infoWindow 
                     infowindow.open(map, marker);
                 });

             }
             else {
                 alert("Não encontramos endereço cadastrado, para exibir no mapa.");
             }
         });

     }

     window.onload = InitializeMap;

     function Resize() {
         google.maps.event.trigger(map, 'resize');
         //            map.setCenter(center);
         //            InitializeMap();
     }

     function Navigate(siteInfos) {
         var home = document.getElementById('lnkSite').innerText;

         javascript: window.open(home);
     }

    </script>

    <form id="form1" runat="server">

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>


            <div id="informacoes">
                 
           <h2 class="titulo">Info Supplier</h2>
             <hr />

                <div class="ServInfoEsq">

            <div class="fotoPr">
            
                <asp:Image ID="FotoPrincipal" runat="server" Height="200px" Width="200px" />
            
            </div>
            
            <div class="imgCateg">
            
                <asp:Image ID="ImgCateg" runat="server" Height="17px" Width="89px" />
            
                <asp:Label ID="lblMsgInfoSupplier" runat="server"></asp:Label>
            
            </div>

            <div class="Endereco">
            
                <asp:Label ID="lblNomeSupplier" CssClass="tituloEndereco" runat="server"></asp:Label>
                <br />
                <asp:Label ID="lblEndereco" CssClass="tituloEndereco" runat="server"></asp:Label>
                <br />
                <asp:Label ID="lblCidade" CssClass="tituloEndereco" runat="server"></asp:Label>
                <br />
                <asp:Label ID="lblPais" CssClass="tituloEndereco" runat="server"></asp:Label>
                <br />
                <asp:LinkButton ID="lnkSite" runat="server" onclientclick="Navigate()"></asp:LinkButton>
            </div>

            <div class="Infos">
                <div id="scrollInfo">
                <br />
                <asp:Label ID="lblInfoShort" runat="server"></asp:Label>
                <br />
                <br />
                <asp:Label ID="lblInfoLong" runat="server"></asp:Label>
                <br />
                <br />
                <asp:Label ID="lblRemarks" runat="server"></asp:Label>
                </div>
            </div>
            
            </div>

           <div class="ServInfoDir">

            <div id="Imagens">

             <div class="popular-fotoInfo-container">
          <div id="scrollFotos">
           <div id="gallery">
     <asp:DataList ID="DataListFotosInfo" runat="server" Width="16px" 
                   RepeatDirection="Horizontal" RepeatColumns="7" 
         CellPadding="0"
         Height="16px">
         <ItemTemplate>
          <div class="popular-fotoInfo-col">
                    <div class="popular-fotoInfo-img-border">
             <a href='<%# String.Format("/NewTierra/Galeria/{0}/{1}", DataBinder.Eval(Container.DataItem,"S_id"), DataBinder.Eval(Container.DataItem, "Image_nome"))%>'><asp:Image ID="Image2" runat="server" Height="70px" Width="70px"  ImageUrl='<%# String.Format("/NewTierra/Galeria/{0}/{1}", DataBinder.Eval(Container.DataItem,"S_id"), DataBinder.Eval(Container.DataItem, "Image_nome"))%>'/></a>

            <br />
            </div>
            </div>

         </ItemTemplate>

     </asp:DataList>
     </div>
          </div>
     </div>
            
            </div>
                <asp:Label ID="lblMsgFotoSupplier" runat="server"></asp:Label>

            <div id="MapaGoogle">
            <div id="map" style="height: 391px; width: 641px"></div>
            </div>

          </div>
        </div>
    </form>
</body>
</html>
